--- When top level definitions are not lazy enough, this program may hang.
module tests.comp.Issue169 where

import frege.lib.ForkJoin(mapP)

doSomething :: Int → Int
doSomething x = x * x

-- sumOther = sum (map doSomething [1,2,3])
sumNumbers = sum (mapP doSomething [9, 10, 3, 4]) 


main args  = do
    --  let
    --      sumSquares = sum ( mapP doSomething [9, 10, 3, 4, 7, 3, 49, 10, 3, 4, 7, 3, 49, 10, 3, 4, 7, 3, 4, 10] )
    -- println sumOther
    println (sumNumbers)
